<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
	"http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8">
		<title>width() testing</title>
		<!-- load latest build of jquery.js -->
		<script type="text/javascript" src="../../../../jquery/dist/jquery.js"></script>
		<!-- load testrunner from jquery project -->
		<script type="text/javascript" src="testrunner.js"></script>
		<!-- load dimensions.js (this is what we're testing! -->
		<script type="text/javascript" src="../../jquery.dimensions.js"></script>
		<style type="text/css" media="screen">
			body{ margin:0; border:0; padding:0; width:500px; }
			h1,h2,p,#tests{display:none;position:absolute;}
			#main { width: 1000px; height: 1000px; }
			#h1 { margin:10px; border:2px solid #000; padding:5px; width:50px; height:50px; overflow: auto; }
			#h2 { width: 300px; height: 300px; }
		</style>
		
		<script type="text/javascript" charset="utf-8">
			$(window).bind('load', function() {
				runTest(function() {
					window.parent.done($('#tests').html());
				});
			});
			test('scrollLeft()', function() {
				equals( 0, $(window).scrollLeft(), "$(window).scrollLeft()" );
				equals( 0, $(document).scrollLeft(), "$(document).scrollLeft()" );
				equals( 0, $('#h1').scrollLeft(), "$('#h1').scrollLeft()" );
				
				equals( 25, $(window).scrollLeft(25).scrollLeft(), "$(window).scrollLeft(25).scrollLeft()" );
				equals( 25, $(document).scrollLeft(25).scrollLeft(), "$(document).scrollLeft(25).scrollLeft()" );
				equals( 25, $('#h1').scrollLeft(25).scrollLeft(), "$('#h1').scrollLeft(25).scrollLeft()" );
			});
			test('scrollTop()', function() {
				equals( 0, $(window).scrollTop(), "$(window).scrollTop()" );
				equals( 0, $(document).scrollTop(), "$(window).scrollTop()" );
				equals( 0, $('#h1').scrollTop(), "$('#h1').scrollTop()" );
				
				equals( 25, $(window).scrollTop(25).scrollTop(), "$(window).scrollTop(25).scrollTop()" );
				equals( 25, $(document).scrollTop(25).scrollTop(), "$(document).scrollTop(25).scrollTop()" );
				equals( 25, $('#h1').scrollTop(25).scrollTop(), "$('#h1').scrollTop(25).scrollTop()" );
			});
		</script>
	</head>
	<body>
		<div id="main">
			<div id="h1">
				<div id="h2"></div>
			</div>
		</div>
		<ol id="tests"></ol>
	</body>
</html>